const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      fallback: {
        path: false,
        crypto: false,
        fs: false,
      },
    },
    output: {
      filename: "[name].[chunkhash].js",
      chunkFilename: "[name].[chunkhash].js",
    },
  },
  devServer: {
    historyApiFallback: true,
    allowedHosts: "all",
    // https: false,
    // https: true,


    //http/https切换
    server: {
      type: 'https',
      // options: {
      //   minVersion: 'TLSv1.1',
      //   // passphrase: 'webpack-dev-server',
      //   // requestCert: true,
      // },
    },

    // headers: {
    //   "Cache-Control": "public,max-age=3600",
    //   "expires":"1y",
    //   "Pragma":''
    //   // "Expires": new Date(Date.now() + 3600000).toUTCString()
    //
    // },
  },
});
